<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page
	import="com.onlineMIS.ORM.entity.headQ.barcodeGentor.*,java.util.Date,java.text.SimpleDateFormat"%>
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>查询条形码</title>
<%@ include file="../../common/Style.jsp"%>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/conf_files/js/BarcodeSearchKeys.js"></script>

<script type="text/javascript"
	src="<%=request.getContextPath()%>/conf_files/js/HtmlTable.js"></script>
<script>
var newsDataGrid = undefined;
$(document).ready(function(){
	parent.$.messager.progress('close'); 
	jQuery.excel('InnerTableContent');
	$("#brandName").focus();
	$("#belongTo").val(99);
	$("#brandNums").val(0);
	$('#dlg').dialog('close')
	
	$('#brandGrid').edatagrid({});
    
	var params = $.serializeObject($('#barcodeSearchForm'));
	newsDataGrid = $('#dataGrid').datagrid({
		url : 'productJSONAction.action',
		queryParams: params,
		fit : true,
		border : false,
		pagination : true,
		pageSize : 200,
		pageList : [ 200, 300],
		checkOnSelect : false,
		selectOnCheck : false,
		singleSelect:true,
		nowrap : false,
		showFooter:true,
		checkbox:true,
		rownumbers:true,
		autoRowHeight:false,
		columns : [ [
			{			
				field : 'checkBarcode',
				title : '货品条形码',
				width : 120,
				checkbox:true,
				align: 'center'
			},{
			field : 'year',
			title : '年份',
			width : 70,
			align: 'center',
			formatter: function (value, row, index){
				return row.year + row.quarter;
			}	
		},{
			field : 'brand',
			title : '品牌',
			width : 105,
			align: 'center'
				
		},{
			field : 'brandComment',
			title : '品牌备注',
			width : 100
				
		},{
			field : 'categoryLevel',
			title : '产品线',
			width : 70,
			align: 'center'
				
		},{
			field : 'category',
			title : '货品类',
			width : 90,
			align: 'center'
				
		},{
			field : 'productCode',
			title : '货号',
			width : 90,
			align: 'center'
				
		},{
			field : 'color',
			title : '颜色',
			width : 70,
			align: 'center'
				
		},{
			field : 'size',
			title : '尺码',
			width : 70,
			align: 'center'
				
		}, {
			field : 'numPerHand',
			title : '齐码/单位',
			width : 75,
			align: 'center',
			formatter: function (value, row, index){
				return row.numPerHand + row.unit;
			}
		}, {
			field : 'factorySalesPrice',
			title : '厂家零售价',
			width : 70,
			align: 'center'
		}, 
		 {
			field : 'discount',
			title : '折扣',
			width : 60,
			align: 'center'
		},{
			field : 'salesPrice',
			title : '千禧吊牌价',
			width : 70,
			align: 'center'
		}, {
			field : 'cost',
			title : '进价',
			width : 60,
			align: 'center'
		}, {
			field : 'wholeSalePrice',
			title : '预设价1',
			width : 70,
			align: 'center'
		},	{			
			field : 'barcode',
			title : '货品条形码',
			width : 120,
			align: 'center'
		},	{			
			field : 'productIdentity',
			title : '公司货号',
			width : 100,
			align: 'center'
		}, {			
			field : 'factoryCode',
			title : '厂家货号',
			width : 100,
			align: 'center'
		},{
			field : 'createBy',
			title : '录入人员',
			width : 90,
			align: 'center'
		},{
			field : 'lastUpdateBy',
			title : '最后修改人',
			width : 90,
			align: 'center'
		},{
			field : 'createTime',
			title : '创建时间',
			width : 140
		}, {	
			field : 'action',
			title : '修改',
			width : 70,
			align: 'center',
			formatter : function(value, row, index) {

				var str = $.formatString('<a href="#" onclick="viewBarcodeDetails(\'{0}\');"><img border="0" src="{1}" title="修改"/></a>', row.barcode,'<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/update3.png');
				
				return str;
			}
		}, {	
			field : 'copy',
			title : '复制',
			width : 70,
			align: 'center',
			formatter : function(value, row, index) {
				var copyInfo = row.year + " "  + row.quarter + " "  + row.brandComment + " "  + row.categoryLevel + " "  + row.category + " "  + row.productCode + " "  + row.color + " "  + row.size + " "  + row.numPerHand + "/"  + row.unit + " "  + row.factorySalesPrice + " "  + row.discount + " "  + row.salesPrice + " "  + row.cost + " "  + row.wholeSalePrice + " "  + row.barcode;

				var str = $.formatString('<a href="#" onclick="copy(\'{0}\',\'{1}\');"><img border="0" src="{2}" title="修改"/></a>', copyInfo,row.barcode,'<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/copy4.png');
				
				return str;
			}
		}
		]],
		toolbar : '#toolbar',
	});
	
});


/**
 * 根据条码查询/修改条码详情（旧）

function viewBarcodeDetails(barcode){
	var url = 'productJSPAction!searchForUpdate?formBean.productBarcode.barcode=' + barcode;
	window.open (url,'新窗口','height=950, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
}
 */


/**
 * 根据条码查询/修改条码详情
 */
function copy(copyInfo,barcode){
	
	 const textarea = document.createElement('textarea');
	 textarea.value = copyInfo;	 
	  // 添加到文档中
	  textarea.style.position = 'fixed';
	  textarea.style.left = '0';
	  textarea.style.top = '0';
	  document.body.appendChild(textarea);
	 
	  // 选择文本
	  textarea.select();
	  
	  try {
	    const result = document.execCommand('copy');
	    if (result) {
	    	$.messager.show({
                title:'提示',
                msg: barcode +'复制成功',
                showType:'slide',
                timeout:'140',
                style:{                  
                    top:document.body.scrollTop+document.documentElement.scrollTop,
                    bottom:''
                }
            });
	    } else {
	    	$.messager.show({
	    		title:'提示',
	            msg: barcode +'复制失败',
                showType:'slide',
                timeout:'140',
                style:{
                    right:'',
                    top:document.body.scrollTop+document.documentElement.scrollTop,
                    bottom:''
                }
            });
	    }
	  } catch (error) {
		  $.messager.show({
			  title:'提示',
	          msg: barcode +'复制异常',
	          timeout:'140',
              showType:'slide',
              style:{
                  right:'',
                  top:document.body.scrollTop+document.documentElement.scrollTop,
                  bottom:''
              }
          });
	  }	 
	  // 移除元素
	  textarea.remove();
}



/**
 * to ensure user has select some criteria
 */
function validateSearch(){
	//查询条件数量
	var conditionCounts = 0;
	var belongTo = $("#belong_To").combobox('getValue');					
	if(belongTo != null){
		$("#belongTo").val(belongTo);
	}
	var belongTo2 = $("#belong_To2").combobox('getValue');					
	if(belongTo2 != null){
		$("#belongTo2").val(belongTo2);
	}
	
	//1.年份
	var year = $("#year_ID").val();
	var isCheckYear = true;
	if(year != null && year !=0){
		$("#year").val(year);
		conditionCounts++;
		isCheckYear = false;
	}else{
		$("#year").val(0);
	}
	//2.季度
	var quarter = $("#quarter_ID").val();
	var isCheckQuarter = true;
	if(quarter != null && quarter !=0){
		$("#quarter").val(quarter);
		conditionCounts++;
		isCheckQuarter = false;
	}else{
		$("#quarter").val(0);
	}
	
	//3.产品线
	var categoryLevel = $("#categoryLevelS").val();
	if(categoryLevel != null && categoryLevel !=0){
		$("#categoryLevel").val(categoryLevel);
		conditionCounts++;
	}else{
		$("#categoryLevel").val(0);
	}
	
	//4.货品类别
	var category = $("#categoryS").val();
	if(category != null && category !=0){
		$("#category").val(category);
		conditionCounts++;
	}else{
		$("#category").val(0);
	}
	//5.货号
	var productCode = $("#productCodeS").val();
	if(productCode != null && productCode != ""){
		$("#productCode").val(productCode);
		conditionCounts++;
		return true;
	} else {
		$("#productCode").val("");
	}
	
	//5.厂家货号
	var factoryCode = $("#factoryCodeS").val();
	if(factoryCode != null && factoryCode != ""){
		$("#factoryCode").val(factoryCode);
		conditionCounts++;
		return true;
	} else {
		$("#factoryCode").val("");
	}
	
	
	
	//6.条码
	var barcode = $("#barcodeS").val();
	if(barcode != null && barcode != ""){
		if(barcode.length != 12){
			$.messager.alert('查询提示', "条码信息不正确,请输入长度为12位的正确条码信息", 'warning');
			return false;
		}else{
			$("#barcode").val(barcode);
			conditionCounts++;	
		}	
	} else 
		$("#barcode").val("");
	//7.录入时间
	var time = $("#needCreateDate").is(':checked');
	
	//8.品牌数量
	var brandCounts = $("#brandNums").val();
	if(brandCounts >0){
		conditionCounts++;
	}
	
	//校验规则顺序
	if(barcode.length == 12){
		return true;
	}
	
	//其他不需要校验字段
	var sizeMin = $("#sizeMinS").val();
	$("#sizeMin").val(sizeMin);
	var sizeMax = $("#sizeMaxS").val();
	$("#sizeMax").val(sizeMax);
	var productCode = $("#productCodeS").val();
	$("#productCode").val(productCode);
	
	
	//录入时间未选择时，校验规则
	if(!time){
		
		//a.如果选择了年份，则查询条件只需要两个（其中包含年份信息）
		if(!isCheckYear && conditionCounts >=2){
			return true;
		}
		//b.如果没有选择年份信息，则需要三个查询条件来限制范围
		if(isCheckYear && isCheckQuarter){
			$.messager.alert('查询提示', "年份信息和季度信息不能同时为空", 'warning');
			return false;
		}
	}

	if (!time && conditionCounts < 3){
		$.messager.alert('查询提示', "请在选项（年份，季度，品牌，产品线，货品，货号，条形码，录入时间）中选择至少其中三个查询条件", 'warning');
		return false;
	} else
		return true;
}

/**
 * 导出产品信息->选中导出
 */
function exportBarcodeToExcel(){
	
	var rows = newsDataGrid.datagrid('getChecked');
	var barcodes = [];
	
	if (validateCheckbox()){
		for(var i=0;i<rows.length;i++){
			barcodes.push(rows[i].barcode);
		}		
		$("#barcodes").val(barcodes);
		var url = "action/productJSPAction.action" ;
		document.barcodeSearchForm.action = url;
		document.barcodeSearchForm.submit();	
		$("#barcodes").val("");
	}
}
 
 /**
  * 导出产品信息->条件导出
  */
 function exportByConditionToExcel(){
 		var url = "action/productJSPAction!exportByCondition" ;
 		document.barcodeSearchForm.action = url;
 		document.barcodeSearchForm.submit();	
 	
 }

/**
 * 导出条码打印 ->选中打印
 */
function exportToPrintBarcode(){
	var rows = newsDataGrid.datagrid('getChecked');
	var barcodes = [];
	if (validateCheckbox()){
		for(var i=0;i<rows.length;i++){
			barcodes.push(rows[i].barcode);
		}	
		$("#barcodes").val(barcodes);
		var url = "action/productJSPAction!exportToPrintBarcode";
		document.barcodeSearchForm.action = url;
		document.barcodeSearchForm.submit();	
		$("#barcodes").val("");
	}
}
 
 /**
  * 导出条码打印 ->条件打印
  */
 function exportToPrintBarcodeAll(){
 	var url = "action/productJSPAction!exportToPrintBarcodeAll";
 	document.barcodeSearchForm.action = url;
 	document.barcodeSearchForm.submit();	
 }

/**
 * 导出条码生成文件 ->选中打印
 */
function exportBarcodeForCreation(){
	var rows = newsDataGrid.datagrid('getChecked');
	var barcodes = [];
	if (validateCheckbox()){
		for(var i=0;i<rows.length;i++){
			barcodes.push(rows[i].barcode);
		}
		$("#barcodes").val(barcodes);
		var url = "action/productJSPAction!exportBarcodeForCreation" ;
		document.barcodeSearchForm.action = url;
		document.barcodeSearchForm.submit();	
		$("#barcodes").val("");
	}
}

/**
 * 导出条码生成文件->条件打印
 */
function exportBarcodeForCreationAll(){
		var url = "action/productJSPAction!exportBarcodeForCreationAll" ;
		document.barcodeSearchForm.action = url;
		document.barcodeSearchForm.submit();	
}

/**
 * 吊牌打印 ->选中打印
 */
function tagPrint(){
	var rows = newsDataGrid.datagrid('getChecked');
	var barcodes = [];
	if (validateCheckbox()){
		for(var i=0;i<rows.length;i++){
			barcodes.push(rows[i].barcode);
		}
		$("#barcodes").val(barcodes);
		var url = "action/productJSPAction!tagPrint" ;
		document.barcodeSearchForm.action = url;
		document.barcodeSearchForm.submit();	
		$("#barcodes").val("");
	}	
}
 
 /**
  * 吊牌打印 ->条件打印
  */
 function tagPrintAll(){
 		var url = "action/productJSPAction!tagPrintAll" ;
 		document.barcodeSearchForm.action = url;
 		document.barcodeSearchForm.submit();				
 }

 /**
 * 同步价格 -> 选中同步
 */
function synchronizePrice(){
	var rows = newsDataGrid.datagrid('getChecked');
	var barcodes = [];
	if (validateCheckbox()){
		parent.$.messager.progress({
			text : '数据更新中，请稍后....'
		});
		for(var i=0;i<rows.length;i++){
			barcodes.push(rows[i].barcode);
		}
		$("#error").html("");
	    var params="formBean.barcodes=" + barcodes;
	    $.post("action/productJSONAction!synchronizePrice",params,backProcessS,"json");
	}
}
 /**
  * 同步价格 -> 选中同步回调
  */
function backProcessS(data){
	parent.$.messager.progress('close');
	
	var ERROR_NOT_FOUND = data.ERROR_NOT_FOUND;
	var ERROR_PRICE_INCONSISTANT = data.ERROR_PRICE_INCONSISTANT;
	var ERROR_PRODUCT_CODE_INCONSISTANT = data.ERROR_PRODUCT_CODE_INCONSISTANT;
	var error = "";
	
	if (ERROR_NOT_FOUND == "" && ERROR_PRICE_INCONSISTANT== "" && ERROR_PRODUCT_CODE_INCONSISTANT== "")
		alert("价格同步成功，请重新查询刷新!");
	else {
		if (ERROR_NOT_FOUND != "")
			error += "以下条码未在精算中找到 ： " + ERROR_NOT_FOUND;
		
		if (ERROR_PRICE_INCONSISTANT != "")
			error += "<br/>以下货品价格与精算不一致 ： " + ERROR_PRICE_INCONSISTANT;
		
		if (ERROR_PRODUCT_CODE_INCONSISTANT != "")
			error += "<br/>以下货品的货号与精算不一致 ： " + ERROR_PRODUCT_CODE_INCONSISTANT;		
		
		if (error != "")
			$.messager.alert('提示',error,'warning');
	}
}
  
  
  /**
   * 同步价格 -> 条件同步
   */
 function synchronizePriceAll(){
  	var params = $.serializeObject($('#barcodeSearchForm'));
  	$.post("action/productJSONAction!synchronizePriceAll",params,allBackProcessS,"json");
 }
   /**
    * 同步价格 -> 条件同步回调
    */
  function allBackProcessS(data){
  	parent.$.messager.progress('close');
  	
  	var ERROR_NOT_FOUND = data.ERROR_NOT_FOUND;
  	var ERROR_PRICE_INCONSISTANT = data.ERROR_PRICE_INCONSISTANT;
  	var ERROR_PRODUCT_CODE_INCONSISTANT = data.ERROR_PRODUCT_CODE_INCONSISTANT;
  	var error = "";
  	
  	if (ERROR_NOT_FOUND == "" && ERROR_PRICE_INCONSISTANT== "" && ERROR_PRODUCT_CODE_INCONSISTANT== "")
  		alert("价格同步成功，请重新查询刷新!");
  	else {
  		if (ERROR_NOT_FOUND != "")
  			error += "以下条码未在精算中找到 ： " + ERROR_NOT_FOUND;
  		
  		if (ERROR_PRICE_INCONSISTANT != "")
  			error += "<br/>以下货品价格与精算不一致 ： " + ERROR_PRICE_INCONSISTANT;
  		
  		if (ERROR_PRODUCT_CODE_INCONSISTANT != "")
  			error += "<br/>以下货品的货号与精算不一致 ： " + ERROR_PRODUCT_CODE_INCONSISTANT;		
  		
  		if (error != "")
  			$.messager.alert('提示',error,'warning');
  	}
  }

/**
 * 查询条码
 */
function searchBarcode(){
    if (validateSearch()){
    	var params = $.serializeObject($('#barcodeSearchForm'));
		$('#dataGrid').datagrid('load',params); 
    }
}


function clearAllData(){
	$("#error").html("");
	$("#tip").html("");

    $('#orgTablebody tr').each(function () {                
        $(this).remove();
    });
}
function showCreateDate(){
	if ($("#needCreateDate").attr("checked") == 'checked')
		$("#createDateDiv").show();
	else
		$("#createDateDiv").hide();
}
function selectAll(){

	if ($("#selectAllCheck").prop("checked"))
		
		$("input[name='selectedBarcodes']").prop("checked",true); 
	else
		$("input[name='selectedBarcodes']").prop("checked",false); 
	
}
/**
 * 下载校验
 */
function validateCheckbox(){
		
	var rows = newsDataGrid.datagrid('getChecked');
	var barcodes = [];
	if (rows.length == 0){
		$.messager.alert('下载提示','请先选中货品!','warning');
		return false;
	}
	return true;
}
function removeBrand(){
	$("#brands").find("option:selected").each(function(){
	   var removeColor = $(this).val();
	   if (removeColor != 0 && removeColor != undefined)
		   $("#brands option[value='"+removeColor+"']").remove();  
       });
}

/**
 * once click the button, it will help to search brand
 */
function searchBrand(){	
	
	var brandName = $.trim($("#brandName").val());
	if (brandName != "") {
	    var params= "formBean.productBarcode.product.brand.brand_Name=" + brandName  ; 
    
        var url = encodeURI(encodeURI("productJSPAction!scanBrand?" +params));
	
        window.open(url,'_blank','height=450, width=450, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no');  
	} else {
        alert("请输入品牌名称");
    } 
}

/**
 * user click the brand
 */
function selectHqBrand(brandName, brandId){

	if (brandName != "" && brandId != "" && brandId != 0){
		 $("#brandName").textbox("setValue",brandName)
    }
    
	var added = false;
     $("#brands option").each(function(){
     	   if($(this).val() == brandId)
     	      added = true;
     	   });
    if (added == false)
       $("#brands").append("<option selected value='"+ brandId+"'>"+ brandName+"</option>");
}
 
function deleteAll(){
	$("#year").val(0);
	$("#quarter").val(0);
	$("#categoryLevel").val(0);
	$("#category").val(0);
	$("#sizeMin").val('');
	$("#sizeMax").val('');
	$("#productCode").val('');
	$("#factoryCode").val('');
	$("#barcode").val('');
	
	$("#year_ID").combobox("setValue",'');
	$("#quarter_ID").combobox("setValue",'');
	$("#categoryLevelS").combobox("setValue",'');
	$("#categoryS").combobox("setValue",'');
	$("#sizeMaxS").textbox("setValue",'');
	$("#sizeMinS").textbox("setValue",'');
	$("#productCodeS").textbox("setValue",'');
	$("#factoryCodeS").textbox("setValue",'');
	$("#barcodeS").textbox("setValue",'');	
	deleteBrands();
}



</script>


</head>
<body>
	<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',border:false" style="height: 95px;">
			<s:form id="barcodeSearchForm" name="barcodeSearchForm" action="" method="POST" theme="simple">
			    <input type="hidden" id="barcodes" name="formBean.barcodes"/>
				<table width="98%" align="center" class="OuterTable">
			<tr>
				<td>
					<table width="100%" border="0">
										<tr>
											<td height="55" align="center" colspan="7">		
												<table width="100%" border="0">
													<input type="hidden" id="isInitialized" name="formBean.isInitialized" />
													<tr class="PBAOuterTableTitale">
														<td height="31" colspan="7">条码信息：
															
														</td>
													</tr>
												<tr>
									<td width="4%" height="19" align="center"><strong>录入时间：</strong></td>
									<td width="2%" align="center"><input type="checkbox" name="formBean.needCreateDate" id="needCreateDate" onClick="showCreateDate();" value="true" checked /></td>
									<td width="4%"><strong>开始时间：</strong></td>
									<td width="20%">									
											<s:textfield id="startDate" name="formBean.startDate" cssClass="easyui-datebox"
												data-options="width:100,editable:false" />&nbsp;&nbsp;&nbsp; 截止日期 ：
											<s:textfield id="endDate" name="formBean.endDate" cssClass="easyui-datebox" data-options="width:100,editable:false" />
									</td>		
									<td width="27%">
										<%@ include
												file="../barcodeGentor/BrandInput.jsp"%>											
									</td>
									<td>			
										<a onclick="searchBarcode();" href="javascript:void(0);"
											class="easyui-linkbutton c6" 
											data-options="iconCls:'icon-search'" >查询条码</a>
											
										<a href="javascript:void(0)" id="mb1" class="easyui-menubutton c6" data-options="iconCls:'icon-print',menu:'#mm1',plain:false">导出产品信息</a>
										<div id="mm1" style="width: 150px;">
											<div data-options="iconCls:'icon-redo',name:'price'" onclick="exportBarcodeToExcel();">选中下载</div>
											<div data-options="iconCls:'icon-redo',name:'quantity'" onclick="exportByConditionToExcel();">条件下载</div>
										</div>										
											
											
										<a href="javascript:void(0)" id="mb2" class="easyui-menubutton c6" data-options="iconCls:'icon-print',menu:'#mm2',plain:false">导出条码打印</a>
										<div id="mm2" style="width: 150px;">
											<div data-options="iconCls:'icon-redo',name:'price'" onclick="exportToPrintBarcode();">选中下载</div>
											<div data-options="iconCls:'icon-redo',name:'quantity'" onclick="exportToPrintBarcodeAll();">条件下载</div>
										</div>	

									  <a href="javascript:void(0)" id="mb3" class="easyui-menubutton c6" data-options="iconCls:'icon-print',menu:'#mm3',plain:false">导出条码生成文件</a>
									  <div id="mm3" style="width: 150px;">
										  <div data-options="iconCls:'icon-redo',name:'price'" onclick="exportBarcodeForCreation();">选中下载</div>
										  <div data-options="iconCls:'icon-redo',name:'quantity'" onclick="exportBarcodeForCreationAll();">条件下载</div>
									  </div>

									  <a href="javascript:void(0)" id="mb4" class="easyui-menubutton c6" data-options="iconCls:'icon-print',menu:'#mm4',plain:false">吊牌打印</a>
									  <div id="mm4" style="width: 150px;">
										  <div data-options="iconCls:'icon-redo',name:'price'" onclick="tagPrint();">选中下载</div>
										  <div data-options="iconCls:'icon-redo',name:'quantity'" onclick="tagPrintAll();">条件下载</div>
									  </div>
									  
									   <a href="javascript:void(0)" id="mb5" class="easyui-menubutton c6" data-options="iconCls:'icon-print',menu:'#mm5',plain:false">同步价格</a>
									  <div id="mm5" style="width: 150px;">
										  <div data-options="iconCls:'icon-redo',name:'price'" onclick="synchronizePrice();">选中同步</div>
										  <div data-options="iconCls:'icon-redo',name:'quantity'" onclick="synchronizePriceAll();">条件同步</div>
									  </div>
											 
									</td>													
				
									<td hidden>
										<input type="text" id="belongTo" name="formBean.productBarcode.chainStore.chain_id" />
										<input type="text" id="belongTo2" name="formBean.belongTo2" />
										<input type="text" id="year" name="formBean.productBarcode.product.year.year_ID" />
										<input type="text" id="quarter" name="formBean.productBarcode.product.quarter.quarter_ID" />
										<input type="text" id="categoryLevel" name="formBean.productBarcode.product.categoryLevel1.category_ID" />
										<input type="text" id="category" name="formBean.productBarcode.product.category.category_ID" />
										<input type="text" id="sizeMin" name="formBean.productBarcode.product.sizeMin" />
										<input type="text" id="sizeMax" name="formBean.productBarcode.product.sizeMax" />
										<input type="text" id="productCode" name="formBean.productBarcode.product.productCode" />
										<input type="text" id="factoryCode" name="formBean.productBarcode.product.factoryCode" />
										<input type="text" id="barcode" name="formBean.productBarcode.barcode" />
									</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>


			</s:form>
		</div>
		<div data-options="region:'center',border:false">
			<table id="dataGrid" border="0">
			</table>
						 
		<div id="toolbar" style="padding:4px 15px;">
		选择条件： <s:select cssClass="easyui-combobox" id="belong_To" style="width:90px;height:22px;text-align: center" list="#{0:'店铺',-1:'全部'}" listKey="key" listValue="value"  headerKey="99"  headerValue="总部" />
		
	
		<s:select cssClass="easyui-combobox" id="belong_To2" style="width:90px;height:22px;text-align: center" list="#{0:'千禧',1:'禧乐仓'}" listKey="key" listValue="value"  headerKey="-1"  headerValue="全部"/>

		<s:select  cssClass="easyui-combobox" style="width:90px;height:22px;text-align: center"
								name="formBean.productBarcode.product.year.year_ID" size="1"
								id="year_ID" list="uiBean.basicData.yearList" listKey="year_ID"
								data-options="prompt:'年份'"
								listValue="year" headerKey="0" headerValue="" />
       	  <s:select  cssClass="easyui-combobox" style="width:90px;height:22px;text-align: center"
								name="formBean.productBarcode.product.quarter.quarter_ID"
								size="1" id="quarter_ID" list="uiBean.basicData.quarterList"
								listKey="quarter_ID" listValue="quarter_Name" headerKey="0"
								data-options="prompt:'季度'"
								headerValue="" />
		<s:select  style="width:110px;height:22px;text-align: center"
 								name="formBean.productBarcode.product.categoryLevel1.category_ID"
								size="1" cssClass="easyui-combobox" id="categoryLevelS"
								data-options="prompt:'产品线'"
								list="uiBean.basicData.categoryLevelList" listKey="category_ID"
								listValue="category_Name" headerKey="0" headerValue="" />
	   <s:select  style="width:130px;height:22px;text-align: center"
								name="formBean.productBarcode.product.category.category_ID"
								size="1" cssClass="easyui-combobox" id="categoryS"
								data-options="prompt:'货品类'"
								list="uiBean.basicData.categoryList" listKey="category_ID"
								listValue="category_Name" headerKey="0" headerValue="" />
	<input type="text" style="width:80px;height:22px;text-align: center" class="easyui-numberbox"  
								data-options="prompt:'最小码'"
								name="formBean.productBarcode.product.sizeMin"
								id="sizeMinS" />		
	<input type="text"  style="width:80px;height:22px;text-align: center"  class="easyui-numberbox"  
								data-options="prompt:'最大码'"
								name="formBean.productBarcode.product.sizeMax" 
								id="sizeMaxS"/>	
	<input type="text"  style="width:135px;height:22px;text-align: center"  class="easyui-textbox"
							data-options="prompt:'产品货号'"
							name="formBean.productBarcode.product.productCode"
							id="productCodeS"  />
							<input type="text"  style="width:135px;height:22px;text-align: center"  class="easyui-textbox"
							data-options="prompt:'厂家货号'"
							name="formBean.productBarcode.product.factoryCode"
							id="factoryCodeS"  />
	<input type="text"  style="width:135px;height:22px;text-align: center" name="formBean.productBarcode.barcode" class="easyui-textbox"
							data-options="prompt:'输入12位的条码'"
							id="barcodeS"  />	
	<a onclick="deleteAll();" href="javascript:void(0);" class="easyui-linkbutton c5" style="height:22px;" data-options="">一键清空</a>																	
																																
    </div>
		</div>
		<%@ include file="../common/UpdateBarcodeDiglog.jsp"%>

	</div>
	<br />
</body>
</html>